package J250404;

import java.io.File;
import java.io.IOException;

public class IO3 {
    public static void main(String[] args) throws IOException {
        File file = new File("./testDir/dir1/dir2/");
        file.mkdirs();
//        file.createNewFile();
        System.out.println(file.exists());
        File file1 = new File(file,"./test.txt");
        file1.createNewFile();
        System.out.println(file1.exists());
        File file2 = new File(file,"./renameTo.txt");
        System.out.println(file1.renameTo(file2));
        System.out.println(file2.exists());


    }
}
